<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>公司选择</title>
<%@ include file="/common/util.jsp"%>


<script src="${cdnctx}/dep/jquery/modernizr.js"></script>
<style type="text/css">
  #preview {
    margin: 0 20px;
    float: left;
    border-radius: 10px;
  }
  </style>
<script type="text/javascript">
$(document).ready(function(){
	//jumpPage(1);
	for ( var i = 1; i < 12; i++) {
        $("#id" + i).removeClass("current");
    }
    $("#id11").addClass("current");

});
function jumpPage(pageIndex){   
	$("#selectCompanyMain").attr("action", "${cdnctx}/system/customerinfo/companydetail.shtml");
	$("#pageIndex").val(pageIndex);
	$("#selectCompanyMain").submit(); 
}
function gopage(companycode,url){
	self.location=url+"?admincompanycode="+companycode;
}
</script>
</head>
<body class="main">
	<div class="-frame -style -luster" id="css_container">
		<!--首页框架页眉部分↓-->
		<%@ include file="/WEB-INF/pages/inc/header.jsp"%>
		<!--首页框架页眉部分↑-->

		<div class="content">
			<!-- Left导航菜单◎开始 -->
			<%@ include file="/WEB-INF/pages/inc/leftmenu.jsp"%>

			<div class="main-mid">
				<div class="pos"><img src="${cdnctx}/src/index/img/index.png"><a>公司选择</a></div>
				<div class="css_contentDiv">
						<form id="selectCompanyMain" action="${cdnctx}/system/customerinfo/companydetail.shtml" method="post">
							<input type="hidden" id="pageIndex" name="pageIndex" value="${pageIndex}" />
							<input type="hidden" id="companycode" name="companycode" value="${companycode}" />
							<input type="hidden" id="menuid" name="menuid" value="${menuid}" />
						</form>
						<div class="divTable a-border-radius b-box-shadow">
							<div style="height:99%;background-color:white;overflow: auto;">
								<table width="40%" border="0" cellspacing="0" cellpadding="0" class="formTable">
									<thead>
										<tr>
											<!--  <td align="center">集团番号</td>
											<td align="center">集团名称</td>-->
											<td align="center" width="10%">公司番号</td>
											<td align="center">公司名称&nbsp;<span style="color: red;font-size: 14px; ">(点击选择)</span></td>
										</tr>
									</thead>
									<c:if test="${empty(list) }">
										<tr class="even" align="center" style="color:red">
											<td colspan="4" class="no-data" style="height: 300px;"></td>
										</tr>
									</c:if>
									<c:if test="${not empty(list) }">
										<c:forEach items="${list}" var="entity" varStatus="status">
											<tr <c:if test="${status.index%2==0 }">class="even"</c:if>
												<c:if test="${status.index%2!=0 }">class="odd"</c:if> onclick="gopage(${entity.companyCode},'${cdnctx}${url}');" >
											<!-- <td width="30px;">${entity.groupCode ==0?'':entity.groupCode }</td>
											<td width="80px;">${entity.groupName}</td> -->
											<td align="right" >${entity.companyCode}</td>
											<td align="left" ><a>${entity.customerName}</a></td>
											</tr>
										</c:forEach>
									</c:if>
								</table>
								<section id="preview"></section>
							</div>
							<c:if test="${not empty(list) }">
								<div id="pageInfo" class="pageJump">
									<script type="text/javascript">
						            	pagination.getPaginationHtml('JavaScript:jumpPage({0})',${pageIndex},${pageCount},'pageInfo');
						        	</script>
								<c:if test="${!empty(list) }">
				        		共有${dataCount}条数据
				        		</c:if>
								</div>
							</c:if>
						</div>
				</div>
			</div>

		</div>

		<!--首页框架页尾部分↓-->
		<%@ include file="/WEB-INF/pages/inc/footer.jsp"%>
		<!--首页框架页尾部分↑-->
	</div>
</body>
</html>